<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css"  href="/styles/general.css"/>
<link rel="stylesheet" type="text/css" href="/styles/main.css"/>
<link rel="stylesheet" type="text/css" href="/styles/validator.css"/>
<script src="/js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="/js/formValidator.js" type="text/javascript"></script>
<script src="/js/formValidatorRegex.js" type="text/javascript"></script>
<script type="text/javascript"> 
$(document).ready(function(){
	$.formValidator.initConfig({formid:"myform",onerror:function(msg){alert(msg)}});
	$("#serverip").formValidator({onshow:"请输入服务IP",onfocus:"请至少要输入1个字符",oncorrect:"OK",defaultvalue:""}).inputValidator({min:1,onerror:"长度不正确,请确认"});
	$("#serverlip").formValidator({onshow:"请输入通讯IP",onfocus:"请至少要输入1个字符",oncorrect:"OK",defaultvalue:""}).inputValidator({min:1,onerror:"长度不正确,请确认"});
	$("#servername").formValidator({onshow:"请输入主机名称",onfocus:"请至少要输入1个字符",oncorrect:"OK",defaultvalue:""}).inputValidator({min:1,onerror:"长度不正确,请确认"});
	$("#port").formValidator({onshow:"请输入服务端口",onfocus:"请至少要输入1个字符",oncorrect:"OK",defaultvalue:""}).inputValidator({min:1,onerror:"长度不正确,请确认"});
	$("#weight").formValidator({onshow:"请输入权重",onfocus:"请至少要输入1个字符",oncorrect:"OK",defaultvalue:""}).inputValidator({min:1,onerror:"长度不正确,请确认"});
});
</script>
<title></title>
</head>
<body>
<h1>
<span class="action-span"><a href="/lvsservers/index/vip/{$vip}">管理主机</a></span>
<span class="action-span1"> 添加主机</span>
<div style="clear:both"></div>
</h1>
<div class="main-div">
  <form action="/lvsservers/add/" method="post" name="myform" id="myform" enctype="multipart/form-data">
  <table width="100%" id="table_form">
      <tr>
        <td class="label">VIP：</td>
        <td>
			{form select * vip vip $vip * * $vips}
        </td>
        <td><div id='vipTip' style="width:250px"></div></td>
      </tr>
      <tr>
        <td class="label">服务IP：</td>
        <td>
			{form text * serverip serverip}
        </td>
        <td><div id='serveripTip' style="width:250px"></div></td>
      </tr>
      <tr>
        <td class="label">通讯IP：</td>
        <td>
			{form text * serverlip serverlip}
        </td>
        <td><div id='serverlipTip' style="width:250px"></div></td>
      </tr>
      <tr>
        <td class="label">主机名称：</td>
        <td>
			{form text * servername servername}
        </td>
        <td><div id='servernameTip' style="width:250px"></div></td>
      </tr>
      <tr>
        <td class="label">服务端口：</td>
        <td>
			{form text * port port}
        </td>
        <td><div id='portTip' style="width:250px"></div></td>
      </tr>
      <tr>
        <td class="label">权重：</td>
        <td>
			{form text * weight weight}
        </td>
        <td><div id='weightTip' style="width:250px"></div></td>
      </tr>
      <tr>
        <td class="label">监控器：</td>
        <td>
			{form select * Monitors Monitors * * * $monitors}
        </td>
        <td><div id='MonitorsTip' style="width:250px"></div></td>
      </tr>
  </table>  
   <div class="button-div">
        <input type="submit" value="&nbsp;确&nbsp;定&nbsp;" />
        &nbsp;&nbsp;&nbsp;&nbsp;
        <input type="reset" value="&nbsp;重&nbsp;置&nbsp;" />
   </div>
  </form>
</div>
{template 'footer.html'}
</body>
</html>
